package cn.cefoc.controller;

import cn.cefoc.domain.User;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RefreshScope  //刷新配置
public class UserController {

    @Value("${test.desc}")
    private String desc;

    @GetMapping("/user/{id}")
    public User FindUserById(@PathVariable("id") Long id){
        return new User(1L,"拉克丝","哒哒哒哒！" + desc);
    }
}
